import React from "react";
import "./App.css";
import { Route, Redirect, Switch } from "react-router-dom";
import Index from "./pages/index";
import Header from "./components/Header";
class App extends React.PureComponent {
  render() {
    return (
      <div style={{ height: "100%" }}>
        <Header>电影</Header>
        {/* <React.Suspense fallback={<></>}></React.Suspense> */}
        <Switch>
          <Route path="/" component={Index}></Route>
          {/* <Route path="/area" component={Area} /> */}
          <Redirect from="/" to="/films"></Redirect>
        </Switch>
      </div>
    );
  }
}

export default App;
